#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>
int main()
{
	int I;
	scanf("%d", &I);
	int money = 0;
	switch (I / 100000)
	{
		case 0:money = I / 10;
			break;
		case 1:money = 10000 + (I - 100000)*7.5 / 100;
			break;
		case 3:money = 100000 / 10 + 100000 * 7.5 / 100 + (I - 100000) * 5 / 100;
			break;
		case 4:money = 100000 / 10 + 100000 * 7.5 / 100 + (I - 100000) * 5 / 100;
			break;
		case 5:money = 100000 / 10 + 100000 * 7.5 / 100 + 200000 * 5 / 100 + (I - 400000) * 3 / 100;
			break;
		case 6:money = 100000 / 10 + 100000 * 7.5 / 100 + 200000 * 5 / 100 + (I - 400000) * 3 / 100;
			break;
		case 7:money = 100000 / 10 + 100000 * 7.5 / 100 + 200000 * 5 / 100 + 200000 * 3 / 100 + (I - 600000)*1.5 / 100;
			break;
		case 8:money = 100000 / 10 + 100000 * 7.5 / 100 + 200000 * 5 / 100 + 200000 * 3 / 100 + (I - 600000)*1.5 / 100;
			break;
		case 9:money = 100000 / 10 + 100000 * 7.5 / 100 + 200000 * 5 / 100 + 200000 * 3 / 100 + (I - 600000)*1.5 / 100;
			break; 
		default:money = 100000 / 10 + 100000 * 7.5 / 100 + 200000 * 5 / 100 + 200000 * 3 / 100 + 200000 * 1.5 / 100 + (I - 1000000) / 100;
			break;
	}
	printf("%d", money);
	return 0;
}